<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html lang="en">
    <!--<![endif]-->
    <!-- BEGIN HEAD -->

    <head>
        <title>Login</title>

        <%@include file="../include/_admin_head.jsp" %>
        <link href="${path}/media/assets/pages/css/login-4.min.css" rel="stylesheet" type="text/css" />


    </head>
    <!-- END HEAD -->

    <body class=" login">
        <!-- BEGIN LOGO -->
        <div class="logo">
        <h1 class="form-title" style="color: #FFFFFF;font-family: '幼圆';font-weight: bolder;" >万社</h1>
        </div>
        <!-- END LOGO -->
        <!-- BEGIN LOGIN -->
        <div class="content">
            <!-- BEGIN LOGIN FORM -->
            <form class="login-form" method="post">
                <h3 class="form-title">登录</h3>
                <div class="alert alert-danger display-hide">
                    <button class="close" data-close="alert"></button>
                    <span> Enter any username and password. </span>
                </div>
                <div class="form-group">
                    <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
                    <label class="control-label visible-ie8 visible-ie9">Username</label>
                    <div class="input-icon">
                        <i class="fa fa-user"></i>
                        <input id="name" class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="Username" name="username" /> </div>
                </div>
                <div class="form-group">
                    <label class="control-label visible-ie8 visible-ie9">Password</label>
                    <div class="input-icon">
                        <i class="fa fa-lock"></i>
                        <input id="pwd" class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="Password" name="password" /> </div>
                </div>
                <div class="form-actions">
                    <button onclick="dologin()" type="button" class="btn green pull-right"> Login </button>
                </div><br>
                
                
            </form>
            <!-- END LOGIN FORM -->
            
        </div>
        <!-- END LOGIN -->
        <!-- BEGIN COPYRIGHT -->
        <div class="copyright"> 2017 &copy; CorporationSystem by lyan HuXiaoFeng NiKai. </div>
        <!-- END COPYRIGHT -->
        <!-- BEGIN CORE PLUGINS -->
        <script src="${path}/media/assets/global/plugins/jquery.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/js.cookie.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
        <!-- END CORE PLUGINS -->
        <!-- BEGIN PAGE LEVEL PLUGINS -->
        <script src="${path}/media/assets/global/plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jquery-validation/js/additional-methods.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/select2/js/select2.full.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/backstretch/jquery.backstretch.min.js" type="text/javascript"></script>

        <script src="${path}/media/assets/global/plugins/moment.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/morris/morris.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/morris/raphael-min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/counterup/jquery.waypoints.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/counterup/jquery.counterup.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/amcharts/amcharts/amcharts.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/amcharts/amcharts/serial.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/amcharts/amcharts/pie.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/amcharts/amcharts/radar.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/amcharts/amcharts/themes/light.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/amcharts/amcharts/themes/patterns.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/amcharts/amcharts/themes/chalk.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/amcharts/ammap/ammap.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/amcharts/ammap/maps/js/worldLow.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/amcharts/amstockcharts/amstock.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/fullcalendar/fullcalendar.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/flot/jquery.flot.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/flot/jquery.flot.resize.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/flot/jquery.flot.categories.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jquery-easypiechart/jquery.easypiechart.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jquery.sparkline.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jqvmap/jqvmap/jquery.vmap.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.russia.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.world.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.europe.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.germany.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jqvmap/jqvmap/maps/jquery.vmap.usa.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/jqvmap/jqvmap/data/jquery.vmap.sampledata.js" type="text/javascript"></script>
        <!-- END PAGE LEVEL PLUGINS -->

        <!-- BEGIN PAGE LEVEL PLUGINS -->
        <script src="${path}/media/assets/global/scripts/datatable.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/datatables/datatables.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js" type="text/javascript"></script>
        <!-- END PAGE LEVEL PLUGINS -->
        <!-- BEGIN THEME GLOBAL SCRIPTS -->
        <script src="${path}/media/assets/global/scripts/app.min.js" type="text/javascript"></script>
        <!-- END THEME GLOBAL SCRIPTS -->
        <!-- BEGIN PAGE LEVEL SCRIPTS -->
        <script src="${path}/media/assets/pages/scripts/dashboard.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/pages/scripts/table-datatables-editable.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/pages/scripts/form-validation-md.min.js" type="text/javascript"></script>
        <!-- END PAGE LEVEL SCRIPTS -->
        <!-- BEGIN THEME LAYOUT SCRIPTS -->
        <script src="${path}/media/assets/layouts/layout/scripts/layout.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/layouts/layout/scripts/demo.min.js" type="text/javascript"></script>
        <script src="${path}/media/assets/layouts/global/scripts/quick-sidebar.min.js" type="text/javascript"></script>
        <!-- END THEME LAYOUT SCRIPTS -->


        <!-- BEGIN THEME LAYOUT SCRIPTS -->
        <!-- END THEME LAYOUT SCRIPTS -->
    </body>

    <!-- BEGIN PAGE LEVEL SCRIPTS -->
    <script src="${path}/media/js/admin/login-4.min.js" type="text/javascript"></script>
    <!-- END PAGE LEVEL SCRIPTS -->
<script>

    function dologin() {
        var name = $("#name").val();
        var pwd = $("#pwd").val();
        if ( !isNull(name) && !isNull(pwd))
        $.ajax({
            url : path + '/admin/dologin',
            type : 'post',
            dataType : 'json',
            data : {
                studentId : name,
                password : pwd
            },
            success : function(rd){
                if(rd.statu){
                    alert(rd.msg);
                    window.location.href=path+"/admin/index";
                } else {
                    alert(rd.msg);
                }

            }
        })
    }

    function isNull(obc) {
        return (obc == null || obc.length <= 0);
    }

</script>
</html>